module.exports = {
	html(compentName) {
		return `<div id="${compentName}">
	<search-page ref="searchPage"
		:isSum="isSum"
		:stripe="stripe"
		:isMultiple="isMultiple"
		:columns="columns"
		:firstParams="firstParams"
		:secondParams="secondParams"
		:searchData="searchData"
		:navigateTo="navigateTo">
	</search-page>
</div>`;
	},

	javascript(compentName, params) {
		const defaultFirstParams = `[
			{label: "编号", kind: "input", prop: "id", disabled: true}
		]`;
		const defaultColumns = `[
			{label: "编号", prop: "id", kind: "input", width: 120, sortable: true, isSum: false},
		]`;
		const firstParams = JSON.stringify(params.firstParams ? params.firstParams : defaultFirstParams);
		const firstColumns = JSON.stringify(params.columns ? params.columns : defaultColumns);
		return `export default {
	name: "${compentName}",
	data() {
		return {
			firstParams: ` + firstParams + `,
			secondParams: [],
			columns: ` + firstColumns + `,
			stripe: ${params.stripe},
			isMultiple: ${params.isMultiple},
			isSum: ${params.isSum},
			data: []
		};
	},
	methods: {
		searchData() {
			return this.data;
		}
	}
};`;
	}
};
